T = input("请输入一个带有符号的温度:")
if T[-1] in {"c", "C"}:
    t = eval(T[:-1])*9/5 + 32
    print("该温度对应的华氏温度为：{:.2f}F".format(t))
elif T[-1] in {"f", "F"}:
    t = (eval(T[:-1]) - 32) * 5 / 9
    print("该温度对应的摄氏温度为：{:.2f}C".format(t))
else:
    print("输入格式不正确")